import rtconfig
from building import *

cwd     = GetCurrentDir()
# CPPPATH = [cwd, str(Dir('#'))]

src     = Glob('GD32E10x_standard_peripheral/Source/*.c')
src += [cwd+'/CMSIS/GD/GD32E10x/Source/ARM/startup_gd32e10x.s']
src += [cwd+'/CMSIS/GD/GD32E10x/Source/system_gd32e10x.c']

include_path = [cwd+'/GD32E10x_standard_peripheral'+'/Include',
                cwd+'/CMSIS',
                cwd+'/CMSIS'+'/GD'+'/GD32E10x'+'/Include']

DEFINE = ['USE_STDPERIPH_DRIVER','GD32E10X','HXTAL_VALUE = 25000000','HXTAL_VALUE_25M']
group = DefineGroup('GD32E10x_STD_Peripheral', src, depend = [''], CPPPATH = include_path,CPPDEFINES = DEFINE)

Return('group')
